package a.f.n;

import a.c.d;
import a.c.e;
import a.d.f;
import a.d.w;
import a.f.cd;
import a.f.o;
import a.f.zb;
import a.f.zc;

import java.awt.geom.Rectangle2D;
import java.util.Comparator;

public class j
  extends h
  implements bb, Cloneable
{
  public static final byte k = 1;
  public static final byte l = 3;
  public static final byte m = 2;
  public static final byte n = 0;
  public static final byte o = 0;
  public static final byte p = 1;
  public static final byte q = 2;
  public static final byte r = 3;
  public static final byte s = 4;
  public static final byte t = 5;
  public static final byte u = 6;
  public static final byte v = 7;
  public static final byte w = 1;
  public static final byte x = 2;
  public static final byte y = 3;
  public static final byte z = 4;
  private static final int A = 0;
  private static final int B = 1;
  private static final int C = 2;
  private static final int D = 3;
  private double E;
  private double F;
  private double G;
  private double H;
  private double I;
  private double J;
  private byte K = 0;
  private byte L = 1;
  private byte M = 1;
  private static final Comparator N = new a_(true);
  private static final Comparator O = new a_(false);
  public static boolean P;
  
  public j()
  {
    this((byte)0, (byte)2, (byte)1, 40.0D, 40.0D);
  }
  
  public j(byte paramByte, double paramDouble1, double paramDouble2)
  {
    this(paramByte, (byte)2, (byte)1, paramDouble1, paramDouble2);
  }
  
  public j(byte paramByte1, byte paramByte2, double paramDouble1, double paramDouble2)
  {
    this(paramByte1, paramByte2, (byte)1, paramDouble1, paramDouble2);
  }
  
  public j(byte paramByte1, byte paramByte2, byte paramByte3, double paramDouble1, double paramDouble2)
  {
    this(paramByte1, paramByte2, paramByte3, paramDouble1, paramDouble2, 0.0D, 0.0D, 0.0D, 0.0D);
  }
  
  public j(byte paramByte1, byte paramByte2, byte paramByte3, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6)
  {
    this.K = paramByte1;
    this.L = paramByte2;
    this.M = paramByte3;
    this.E = paramDouble1;
    this.F = paramDouble2;
    this.G = paramDouble3;
    this.H = paramDouble4;
    this.I = paramDouble5;
    this.J = paramDouble6;
  }
  
  protected d.a_ a(e parame, byte paramByte)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    zc localzc = this.i.d(parame);
    d.a_ locala_1;
    Object localObject1;
    if (parame.e() == 0)
    {
      locala_1 = b(parame);
      if (!bool1) {}
    }
    else
    {
      localObject1 = null;
      locala_1 = b(parame);
      Rectangle2D localRectangle2D = locala_1.b();
      double d1 = 0.0D;
      double d2 = 0.0D;
      double d3 = 0.0D;
      label233:
      label236:
      d.a_ locala_2;
      label397:
      label418:
      label490:
      label621:
      label1021:
      double d12;
      label521:
      label523:
      double d15;
      label651:
      double d17;
      label1149:
      label1150:
      double d16;
      label1152:
      label1163:
      label1164:
      double d18;
      double d19;
      double d20;
      if (!bool2) {
        if (b())
        {
          f localf1 = new f(-1.797693134862316E+308D, 1.7976931348623157E+308D, 0.0D);
          if (!bool2) {}
          int j = this.K == 0 ? 1 : 0;
          localf2 = null;
          d4 = 0.0D;
          i1 = 0;
          if (!bool2) {}
          i2 = parame.e() % 2 == 1 ? (parame.e() - 1) / 2 : parame.e() / 2 - 1;
          if (!bool2) {}
          i3 = parame.e() % 2 == 0 ? 1 : 0;
          if (!bool2)
          {
            if (j != 0)
            {
              if (bool2) {
                break label233;
              }
              locala_1.b(0.0D, locala_1.a(2).f(localf1) - this.E);
            }
          }
          else {
            if (!bool1) {
              break label236;
            }
          }
          locala_1.b(0.0D, -localf1.f(locala_1.a(0)) + this.E);
          d5 = this.i.n(parame);
          d6 = d5;
          arrayOfDouble = new double[parame.e()];
          d locald2 = parame.h();
          do
          {
            if (locald2 == null) {
              break;
            }
            locala_2 = a(locald2.f());
            w localw1 = this.i.r(locald2);
            if (bool1) {
              break label651;
            }
            if (!bool2) {
              if (d5 > localw1.b()) {
                d5 = localw1.b();
              }
            }
            if (!bool2) {
              if (d6 < localw1.b()) {
                d6 = localw1.b();
              }
            }
            if (!bool2)
            {
              if (j != 0)
              {
                locala_2.b(0.0D, -localf1.f(locala_2.a(0)));
                if (bool2) {
                  break label418;
                }
              }
            }
            else {
              if (!bool1) {
                break label397;
              }
            }
            locala_2.b(0.0D, locala_2.a(2).f(localf1));
            locala_2.a(locala_2.c(), locala_2.d(), locala_2.c(), 0.0D);
            if (!bool2)
            {
              if (localf2 == null)
              {
                localf2 = locala_2.a(1);
                if (bool2) {
                  break label490;
                }
                if (!bool1) {}
              }
              else
              {
                locala_2.b(-localf2.f(locala_2.a(3)) + this.F, 0.0D);
              }
            }
            else {
              localf2.d(locala_2.a(1));
            }
            arrayOfDouble[i1] = locala_2.c();
            if (!bool2) {
              if (localObject1 == null)
              {
                localObject1 = locala_2;
                if (bool2) {
                  break label523;
                }
                if (!bool1) {
                  break label521;
                }
              }
            }
            ((d.a_)localObject1).a(locala_2);
            if (!bool2) {
              if (i3 != 0)
              {
                if (!bool2)
                {
                  if (i1 == i2)
                  {
                    d4 = locala_2.c();
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {
                      break label621;
                    }
                  }
                  if (bool2) {
                    continue;
                  }
                }
                if (i1 != i2 + 1) {
                  break label621;
                }
                d4 += locala_2.c();
                d4 *= 0.5D;
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label621;
                }
              }
            }
            if (!bool2)
            {
              if (i1 == i2) {
                d4 = locala_2.c();
              }
              a(null, locala_2, locald2);
              locald2 = locald2.i();
              i1++;
            }
          } while (!bool1);
          if (bool2) {
            break label2903;
          }
          double d9 = 0.0D;
          double d7;
          switch (this.L)
          {
          case 2: 
          default: 
            d7 = (((d.a_)localObject1).i() + ((d.a_)localObject1).g()) * 0.5D - localRectangle2D.getCenterX();
            break;
          case 3: 
            d7 = d4 - localRectangle2D.getCenterX();
            break;
          case 1: 
            d7 = ((d.a_)localObject1).g() - localRectangle2D.getX();
            break;
          case 4: 
            d7 = ((d.a_)localObject1).i() - localRectangle2D.getMaxX();
            break;
          case 5: 
            d7 = ((d.a_)localObject1).i() - localRectangle2D.getMinX() + this.F;
            break;
          case 0: 
            d7 = ((d.a_)localObject1).g() - localRectangle2D.getMaxX() - this.F;
            break;
          case 6: 
            d7 = ((d.a_)localObject1).i() - localRectangle2D.getMinX() + this.F;
            if (!bool2) {
              if (j != 0)
              {
                d9 = a(this.i.n(parame), d5, d6) - this.E * 0.5D;
                if (bool2) {
                  break label1021;
                }
                if (!bool1) {
                  break;
                }
              }
              else
              {
                d9 = a(this.i.n(parame), d5, d6) + this.E * 0.5D;
              }
            }
            break;
          case 7: 
            d7 = ((d.a_)localObject1).g() - localRectangle2D.getMaxX() - this.F;
            if (!bool2)
            {
              if (j != 0) {
                d9 = a(this.i.n(parame), d5, d6) - this.E * 0.5D;
              }
            }
            else
            {
              if (bool2) {
                break label1021;
              }
              if (!bool1) {
                break;
              }
            }
            d9 = a(this.i.n(parame), d5, d6) + this.E * 0.5D;
          }
          locala_1.b(d7, d9);
          if (!bool2)
          {
            if (this.M == 1)
            {
              i1 = 0;
              d12 = 0.0D;
              d locald4 = locala_1.m().h();
              do
              {
                if (locald4 == null) {
                  break;
                }
                d15 = this.i.r(locald4).a;
                d17 = arrayOfDouble[i1];
                if (bool2) {
                  break label1150;
                }
                d12 = Math.max(d12, Math.abs(d15 - d17));
                locald4 = locald4.i();
                i1++;
                if (bool1) {
                  break label1149;
                }
              } while (!bool1);
              if (!bool2)
              {
                if (bool2) {
                  break label1163;
                }
                if (d12 > 0.0D)
                {
                  if (bool2) {
                    break label1164;
                  }
                  d1 = Math.max(d12 * this.I, this.J);
                  if (!bool1) {
                    break label1152;
                  }
                }
              }
              d1 = 0.0D;
              double d13 = d1 + this.G + this.H;
              d16 = Math.max(this.E, d13);
              if (!bool2)
              {
                if (j != 0)
                {
                  locala_1.b(0.0D, -d16 + this.E);
                  d18 = -d16 + Math.min(d16 - this.H - d1, Math.max((d16 - d1) * 0.5D, this.G));
                  d19 = -Math.min(d16 - this.G - d1, Math.max((d16 - d1) * 0.5D, this.H));
                  d20 = (d18 + d19) * 0.5D;
                  d3 = d20 - d1 * 0.5D;
                  d2 = d20 + d1 * 0.5D;
                  if (bool2) {
                    break label1426;
                  }
                  if (!bool1) {}
                }
                else
                {
                  locala_1.b(0.0D, d16 - this.E);
                }
              }
              else
              {
                d18 = d16 - Math.min(d16 - this.H - d1, Math.max((d16 - d1) * 0.5D, this.G));
                d19 = Math.min(d16 - this.G - d1, Math.max((d16 - d1) * 0.5D, this.H));
                d20 = (d19 + d18) * 0.5D;
                d3 = d20 + d1 * 0.5D;
                d2 = d20 - d1 * 0.5D;
              }
            }
            locala_1.a((d.a_)localObject1);
          }
          label1426:
          break label2835;
        }
      }
      if (!bool2) {}
      int i = this.K == 1 ? 1 : 0;
      Object localObject2 = new f(-1.797693134862316E+308D, 1.7976931348623157E+308D, 0.0D);
      f localf2 = null;
      double d4 = 0.0D;
      int i1 = 0;
      if (!bool2) {}
      int i2 = parame.e() % 2 == 1 ? (parame.e() - 1) / 2 : parame.e() / 2 - 1;
      if (!bool2) {}
      int i3 = parame.e() % 2 == 0 ? 1 : 0;
      if (!bool2)
      {
        if (i != 0)
        {
          if (bool2) {
            break label1589;
          }
          locala_1.b(-((f)localObject2).f(locala_1.a(3)) + this.F, 0.0D);
        }
      }
      else {
        if (!bool1) {
          break label1592;
        }
      }
      label1589:
      locala_1.b(locala_1.a(1).f((f)localObject2) - this.F, 0.0D);
      label1592:
      double d5 = this.i.m(parame);
      double d6 = d5;
      double[] arrayOfDouble = new double[parame.e()];
      d locald3 = parame.h();
      label1753:
      label1774:
      do
      {
        if (locald3 == null) {
          break;
        }
        locala_2 = a(locald3.f());
        w localw2 = this.i.r(locald3);
        if (bool1) {
          break label2011;
        }
        if (!bool2) {
          if (d5 > localw2.a()) {
            d5 = localw2.a();
          }
        }
        if (!bool2) {
          if (d6 < localw2.a()) {
            d6 = localw2.a();
          }
        }
        if (!bool2)
        {
          if (i != 0)
          {
            locala_2.b(locala_2.a(1).f((f)localObject2), 0.0D);
            if (bool2) {
              break label1774;
            }
          }
        }
        else {
          if (!bool1) {
            break label1753;
          }
        }
        locala_2.b(-((f)localObject2).f(locala_2.a(3)), 0.0D);
        locala_2.a(locala_2.c(), locala_2.d(), 0.0D, locala_2.d());
        if (!bool2) {
          if (localf2 == null)
          {
            localf2 = locala_2.a(2);
            if (bool2) {
              break label1850;
            }
            if (!bool1) {
              break label1840;
            }
          }
        }
        double d11 = localf2.f(locala_2.a(0));
        locala_2.b(0.0D, -d11 + this.E);
        localf2.d(locala_2.a(2));
        arrayOfDouble[i1] = locala_2.d();
        if (!bool2) {
          if (localObject1 == null)
          {
            localObject1 = locala_2;
            if (bool2) {
              break label1883;
            }
            if (!bool1) {
              break label1881;
            }
          }
        }
        ((d.a_)localObject1).a(locala_2);
        if (!bool2) {
          if (i3 != 0)
          {
            if (!bool2)
            {
              if (i1 == i2)
              {
                d4 = locala_2.d();
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label1981;
                }
              }
              if (bool2) {
                continue;
              }
            }
            if (i1 != i2 + 1) {
              break label1981;
            }
            d4 += locala_2.d();
            d4 *= 0.5D;
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label1981;
            }
          }
        }
        if (!bool2)
        {
          if (i1 == i2) {
            d4 = locala_2.d();
          }
          a(null, locala_2, locald3);
          locald3 = locald3.i();
          i1++;
        }
      } while (!bool1);
      label1840:
      label1850:
      label1881:
      label1883:
      if (bool2) {
        break label2908;
      }
      label1981:
      label2011:
      double d8 = 0.0D;
      double d10;
      switch (this.L)
      {
      case 2: 
      default: 
        d10 = (((d.a_)localObject1).j() + ((d.a_)localObject1).h()) * 0.5D - localRectangle2D.getCenterY();
        if (bool2) {
          break label2430;
        }
        if (!bool1) {
          break;
        }
      case 3: 
        d10 = d4 - localRectangle2D.getCenterY();
        if (bool2) {
          break label2430;
        }
        if (!bool1) {
          break;
        }
      case 1: 
        d10 = ((d.a_)localObject1).h() - localRectangle2D.getY();
        if (bool2) {
          break label2430;
        }
        if (!bool1) {
          break;
        }
      case 4: 
        d10 = ((d.a_)localObject1).j() - localRectangle2D.getMaxY();
        if (bool2) {
          break label2430;
        }
        if (!bool1) {
          break;
        }
      case 5: 
        d10 = ((d.a_)localObject1).j() - localRectangle2D.getMinY() + this.E;
        if (bool2) {
          break label2430;
        }
        if (!bool1) {
          break;
        }
      case 0: 
        d10 = ((d.a_)localObject1).h() - localRectangle2D.getMaxY() - this.E;
        if (bool2) {
          break label2430;
        }
        if (!bool1) {
          break;
        }
      case 6: 
        d10 = ((d.a_)localObject1).j() - localRectangle2D.getMinY() + this.E;
        if (!bool2)
        {
          if (i == 0)
          {
            d8 = c(this.i.m(parame), d5, d6) - this.F * 0.5D;
            if (bool2) {
              break label2430;
            }
            if (!bool1) {
              break;
            }
          }
          else
          {
            d8 = c(this.i.m(parame), d5, d6) + this.F * 0.5D;
          }
        }
        else
        {
          if (bool2) {
            break label2430;
          }
          if (!bool1) {
            break;
          }
        }
        break;
      case 7: 
        d10 = ((d.a_)localObject1).h() - localRectangle2D.getMaxY() - this.E;
        if (!bool2)
        {
          if (i == 0) {
            d8 = c(this.i.m(parame), d5, d6) - this.F * 0.5D;
          }
        }
        else
        {
          if (bool2) {
            break label2430;
          }
          if (!bool1) {
            break;
          }
        }
        d8 = c(this.i.m(parame), d5, d6) + this.F * 0.5D;
      }
      label2561:
      label2572:
      label2573:
      if (!bool2)
      {
        locala_1.b(d8, d10);
        label2430:
        if (this.M == 1)
        {
          i1 = 0;
          d12 = 0.0D;
          d locald5 = locala_1.m().h();
          do
          {
            if (locald5 == null) {
              break;
            }
            d15 = this.i.r(locald5).b;
            d17 = arrayOfDouble[i1];
            if (bool2) {
              break label2559;
            }
            d12 = Math.max(d12, Math.abs(d15 - d17));
            locald5 = locald5.i();
            i1++;
            if (bool1) {
              break label2558;
            }
          } while (!bool1);
          if (!bool2)
          {
            if (bool2) {
              break label2572;
            }
            if (d12 > 0.0D)
            {
              if (bool2) {
                break label2573;
              }
              d1 = Math.max(d12 * this.I, this.J);
              if (!bool1) {
                break label2561;
              }
            }
          }
          label2558:
          label2559:
          d1 = 0.0D;
          double d14 = d1 + this.G + this.H;
          d16 = Math.max(this.F, d14);
          if (!bool2)
          {
            if (i == 0)
            {
              if (bool2) {
                break label2830;
              }
              locala_1.b(-d16 + this.F, 0.0D);
              d18 = -d16 + Math.min(d16 - this.H - d1, Math.max((d16 - d1) * 0.5D, this.G));
              d19 = -Math.min(d16 - this.G - d1, Math.max((d16 - d1) * 0.5D, this.H));
              d20 = (d18 + d19) * 0.5D;
              d3 = d20 - d1 * 0.5D;
              d2 = d20 + d1 * 0.5D;
              if (!bool1) {}
            }
            else
            {
              locala_1.b(d16 - this.F, 0.0D);
            }
          }
          else
          {
            d18 = d16 - Math.min(d16 - this.H - d1, Math.max((d16 - d1) * 0.5D, this.G));
            d19 = Math.min(d16 - this.G - d1, Math.max((d16 - d1) * 0.5D, this.H));
            d20 = (d19 + d18) * 0.5D;
            d3 = d20 + d1 * 0.5D;
            d2 = d20 - d1 * 0.5D;
          }
        }
      }
      label2830:
      locala_1.a((d.a_)localObject1);
      label2835:
      d locald1 = parame.h();
      do
      {
        if (locald1 == null) {
          break;
        }
        localObject2 = a(locald1.f());
        a(localzc, (d.a_)localObject2, locald1, d2, d3);
        if (bool2) {
          break label2948;
        }
        locala_1.a(this.i, locald1);
        locald1 = locald1.i();
        if (bool1) {
          return locala_1;
        }
      } while (!bool1);
    }
    label2903:
    if (!bool2) {
      label2908:
      if (parame.i() != null)
      {
        localObject1 = this.i.e(parame.i());
        a(this.i, parame, localzc, locala_1, parame.i(), (zb)localObject1, paramByte);
      }
    }
    label2948:
    return locala_1;
  }
  
  private boolean b()
  {
    boolean bool = k.n;
    if (!bool) {
      if (this.K != 0) {
        if (bool) {
          break label28;
        }
      }
    }
    label28:
    return this.K == 2;
  }
  
  private double a(double paramDouble1, double paramDouble2, double paramDouble3)
  {
    if (!k.n) {
      if (1 == this.M) {
        return -paramDouble1;
      }
    }
    switch (this.K)
    {
    case 2: 
      return -paramDouble2;
    case 0: 
      return -paramDouble3;
    }
    return -paramDouble1;
  }
  
  private double c(double paramDouble1, double paramDouble2, double paramDouble3)
  {
    if (!k.n) {
      if (1 == this.M) {
        return -paramDouble1;
      }
    }
    switch (this.K)
    {
    case 1: 
      return -paramDouble2;
    case 3: 
      return -paramDouble3;
    }
    return -paramDouble1;
  }
  
  protected void a(o paramo, e parame, zc paramzc, d.a_ parama_, d paramd, zb paramzb, byte paramByte)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    if ((bool2) || ((paramByte == -2) || (paramByte == -1))) {
      return;
    }
    cd localcd = cd.e(paramo, paramd);
    if ((bool2) || (localcd == null)) {
      localcd = cd.a((byte)0);
    }
    double d1 = paramzc.a() + paramzc.c();
    double d2 = paramzc.b() + paramzc.d();
    double d3 = this.E * 0.5D;
    double d4 = this.F * 0.5D;
    double d5 = this.E * 0.25D;
    double d6 = this.F * 0.25D;
    if (!bool2)
    {
      switch (this.K)
      {
      case 1: 
        if (!bool2) {
          switch (paramByte)
          {
          case 0: 
          case 3: 
            if (!bool2) {
              if (localcd.e())
              {
                parama_.a(parama_.i() + d4, parama_.d());
                if (bool2) {
                  break label331;
                }
                if (!bool1) {
                  break label329;
                }
              }
            }
            if (!bool2) {
              if (localcd.d())
              {
                parama_.a(parama_.c(), d2 + d3);
                parama_.a(parama_.i() + d4, parama_.d());
                if (bool2) {
                  break label331;
                }
                if (!bool1) {
                  break label329;
                }
              }
            }
            if (!bool2) {
              if (localcd.f()) {
                parama_.a(paramzc.a() - d6, parama_.d());
              }
            }
            if (!bool2) {
              if (paramByte == 3)
              {
                parama_.a(parama_.c(), parama_.h() - d3);
                parama_.a(parama_.g(), parama_.h() - d3);
                if (bool2) {
                  break label662;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            break;
          case 1: 
            if (!bool2) {
              if (localcd.c())
              {
                parama_.a(parama_.c(), paramzc.b() - d3);
                if (bool2) {
                  break label662;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.d())
              {
                parama_.a(parama_.c(), d2 + d3);
                if (bool2) {
                  break label662;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.f())
              {
                parama_.a(paramzc.a() - d6, parama_.d());
                parama_.a(parama_.c(), paramzc.b() - d3);
                if (bool2) {
                  break label662;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            break;
          case 2: 
            if (!bool2) {
              if (localcd.e())
              {
                parama_.a(parama_.i() + d4, parama_.d());
                if (bool2) {
                  break label662;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.c())
              {
                parama_.a(parama_.c(), paramzc.b() - d3);
                parama_.a(parama_.i() + d4, parama_.d());
                if (bool2) {
                  break label662;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.f()) {
                parama_.a(paramzc.a() - d6, parama_.d());
              }
            }
            break;
          }
        }
        if ((!bool2) && (!bool1)) {
          break;
        }
      case 3: 
        if (!bool2) {
          switch (paramByte)
          {
          case 0: 
          case 1: 
            if (!bool2) {
              if (localcd.e())
              {
                parama_.a(d1 + d6, parama_.d());
                if (bool2) {
                  break label836;
                }
                if (!bool1) {
                  break label834;
                }
              }
            }
            if (!bool2) {
              if (localcd.d())
              {
                parama_.a(parama_.c(), d2 + d3);
                parama_.a(parama_.g() - d4, parama_.d());
                if (bool2) {
                  break label836;
                }
                if (!bool1) {
                  break label834;
                }
              }
            }
            if (!bool2) {
              if (localcd.f()) {
                parama_.a(paramzc.a() - d4, parama_.d());
              }
            }
            if (!bool2) {
              if (paramByte == 1)
              {
                parama_.a(parama_.c(), parama_.h() - d3);
                parama_.a(parama_.i(), parama_.h() - d3);
                if (bool2) {
                  break label1159;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            break;
          case 3: 
            if (!bool2) {
              if (localcd.c())
              {
                parama_.a(parama_.c(), paramzc.b() - d3);
                if (bool2) {
                  break label1159;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.d())
              {
                parama_.a(parama_.c(), d2 + d3);
                if (bool2) {
                  break label1159;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.e())
              {
                parama_.a(d1 + d6, parama_.d());
                parama_.a(parama_.c(), paramzc.b() - d3);
                if (bool2) {
                  break label1159;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            break;
          case 2: 
            if (!bool2) {
              if (localcd.e())
              {
                parama_.a(d1 + d6, parama_.d());
                if (bool2) {
                  break label1159;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.c())
              {
                parama_.a(parama_.c(), paramzc.b() - d3);
                parama_.a(parama_.g() - d4, parama_.d());
                if (bool2) {
                  break label1159;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.f()) {
                parama_.a(parama_.g() - d6, parama_.d());
              }
            }
            break;
          }
        }
        if ((!bool2) && (!bool1)) {
          break;
        }
      case 0: 
        if (!bool2) {
          switch (paramByte)
          {
          case 0: 
            if (!bool2) {
              if (localcd.e())
              {
                parama_.a(d1 + d4, parama_.d());
                if (bool2) {
                  break label1656;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.d())
              {
                parama_.a(parama_.c(), d2 + d5);
                parama_.a(paramzc.a() - d4, parama_.d());
                if (bool2) {
                  break label1656;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.f())
              {
                parama_.a(paramzc.a() - d4, parama_.d());
                if (bool2) {
                  break label1656;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            break;
          case 1: 
            if (!bool2) {
              if (localcd.c())
              {
                parama_.a(parama_.c(), paramzc.b() - d3);
                if (bool2) {
                  break label1656;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.d())
              {
                parama_.a(parama_.c(), d2 + d5);
                if (bool2) {
                  break label1656;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            if (!bool2) {
              if (localcd.f())
              {
                parama_.a(paramzc.a() - d4, parama_.d());
                parama_.a(parama_.c(), parama_.h() - d3);
                if (bool2) {
                  break label1656;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            break;
          case 2: 
          case 3: 
            if (!bool2) {
              if (localcd.e())
              {
                parama_.a(d1 + d4, parama_.d());
                parama_.a(parama_.c(), parama_.h() - d3);
                if (bool2) {
                  break label1609;
                }
                if (!bool1) {
                  break label1607;
                }
              }
            }
            if (!bool2) {
              if (localcd.c())
              {
                parama_.a(parama_.c(), paramzc.b() - d3);
                if (bool2) {
                  break label1609;
                }
                if (!bool1) {
                  break label1607;
                }
              }
            }
            if (!bool2) {
              if (localcd.d()) {
                parama_.a(parama_.c(), d2 + d5);
              }
            }
            if (!bool2) {
              if (paramByte == 2)
              {
                parama_.a(parama_.g() - d4, parama_.d());
                parama_.a(parama_.g() - d4, parama_.j());
              }
            }
            break;
          }
        }
        if ((!bool2) && (!bool1)) {
          break;
        }
      case 2: 
        label329:
        label331:
        label1656:
        if (!bool2) {}
        label662:
        label834:
        label836:
        label1607:
        label1609:
        switch (paramByte)
        {
        case 2: 
          if (!bool2) {
            if (localcd.e())
            {
              parama_.a(d1 + d4, parama_.d());
              if (bool2) {
                return;
              }
              if (!bool1) {
                break;
              }
            }
          }
          if (!bool2) {
            if (localcd.c())
            {
              parama_.a(parama_.c(), paramzc.b() - d5);
              parama_.a(paramzc.a() - d4, parama_.d());
              if (bool2) {
                return;
              }
              if (!bool1) {
                break;
              }
            }
          }
          if (!bool2)
          {
            if (localcd.f())
            {
              parama_.a(paramzc.a() - d4, parama_.d());
              if (bool2) {
                return;
              }
            }
          }
          else {
            if (!bool1) {
              break;
            }
          }
          break;
        case 1: 
          if (!bool2) {
            if (localcd.c())
            {
              parama_.a(parama_.c(), paramzc.b() - d5);
              if (bool2) {
                return;
              }
              if (!bool1) {
                break;
              }
            }
          }
          if (!bool2) {
            if (localcd.d())
            {
              parama_.a(parama_.c(), parama_.j() + d3);
              if (bool2) {
                return;
              }
              if (!bool1) {
                break;
              }
            }
          }
          if (!bool2)
          {
            if (localcd.f())
            {
              parama_.a(paramzc.a() - d4, parama_.d());
              parama_.a(parama_.c(), parama_.j() + d3);
              if (bool2) {
                return;
              }
            }
          }
          else {
            if (!bool1) {
              break;
            }
          }
          break;
        case 0: 
        case 3: 
          if (!bool2) {
            if (localcd.e())
            {
              parama_.a(d1 + d4, parama_.d());
              parama_.a(parama_.c(), parama_.j() + d3);
              if (bool2) {
                break label2112;
              }
              if (!bool1) {
                break label2110;
              }
            }
          }
          if (!bool2) {
            if (localcd.c())
            {
              parama_.a(parama_.c(), paramzc.b() - d5);
              if (bool2) {
                break label2112;
              }
              if (!bool1) {
                break label2110;
              }
            }
          }
          if (!bool2) {
            if (localcd.d()) {
              parama_.a(parama_.c(), d2 + d3);
            }
          }
          if (paramByte == 0)
          {
            parama_.a(parama_.g() - d4, parama_.d());
            parama_.a(parama_.g() - d4, parama_.h());
          }
          break;
        }
        label1159:
        label2110:
        label2112:
        break;
      }
      parama_.e();
    }
  }
  
  protected void a(zc paramzc, d.a_ parama_, d paramd)
  {
    zb localzb = this.i.e(paramd);
    localzb.b();
  }
  
  protected void a(zc paramzc, d.a_ parama_, d paramd, double paramDouble1, double paramDouble2)
  {
    if (!k.n) {
      if (this.M != 1) {
        b(paramzc, parama_, paramd);
      }
    }
    a(parama_, paramd, paramDouble1, paramDouble2);
  }
  
  protected void b(zc paramzc, d.a_ parama_, d paramd)
  {
    a(parama_, paramd, 0.0D, 0.0D);
  }
  
  private void a(d.a_ parama_, d paramd, double paramDouble1, double paramDouble2)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    if (!bool2) {
      if (this.M == 3) {
        return;
      }
    }
    zb localzb = this.i.e(paramd);
    localzb.b();
    w localw;
    if (!bool2) {
      if (this.M == 1)
      {
        localw = this.i.r(paramd);
        if (!bool2) {
          if (this.K == 2)
          {
            localzb.a(localw.a, paramDouble2);
            localzb.a(parama_.c(), paramDouble1);
            if (bool2) {
              return;
            }
            if (!bool1) {
              break label401;
            }
          }
        }
        if (!bool2) {
          if (this.K == 0)
          {
            localzb.a(localw.a, paramDouble2);
            localzb.a(parama_.c(), paramDouble1);
            if (bool2) {
              return;
            }
            if (!bool1) {
              break label401;
            }
          }
        }
        if (!bool2)
        {
          if (this.K == 1)
          {
            localzb.a(paramDouble2, localw.b);
            localzb.a(paramDouble1, parama_.d());
            if (bool2) {
              return;
            }
            if (!bool1) {
              break label401;
            }
          }
          localzb.a(paramDouble2, localw.b);
          localzb.a(paramDouble1, parama_.d());
          if (bool2) {
            return;
          }
        }
      }
    }
    if ((bool1) && ((bool2) || (this.M == 2)))
    {
      localw = this.i.r(paramd);
      if (!bool2) {
        if (this.K == 2)
        {
          localzb.a(parama_.c(), localw.b);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break label401;
          }
        }
      }
      if (!bool2) {
        if (this.K == 0)
        {
          localzb.a(parama_.c(), localw.b);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break label401;
          }
        }
      }
      if (!bool2)
      {
        if (this.K == 1)
        {
          localzb.a(localw.a, parama_.d());
          if (bool2) {
            return;
          }
        }
      }
      else {
        if (!bool1) {
          break label401;
        }
      }
      localzb.a(localw.a, parama_.d());
    }
    label401:
    parama_.a(localzb);
  }
  
  public byte c()
  {
    return this.K;
  }
  
  public void a(byte paramByte)
  {
    this.K = paramByte;
  }
  
  public byte d()
  {
    return this.L;
  }
  
  public void b(byte paramByte)
  {
    this.L = paramByte;
  }
  
  protected byte c(e parame)
  {
    if (!k.n) {
      if (this.M == 3) {
        return -2;
      }
    }
    return this.K;
  }
  
  public byte e()
  {
    return this.M;
  }
  
  public void c(byte paramByte)
  {
    this.M = paramByte;
  }
  
  public double f()
  {
    return this.E;
  }
  
  public void a(double paramDouble)
  {
    this.E = paramDouble;
  }
  
  public double g()
  {
    return this.G;
  }
  
  public void b(double paramDouble)
  {
    this.G = paramDouble;
  }
  
  public double h()
  {
    return this.G;
  }
  
  public void c(double paramDouble)
  {
    this.H = paramDouble;
  }
  
  public double i()
  {
    return this.I;
  }
  
  public void d(double paramDouble)
  {
    this.I = paramDouble;
  }
  
  public double j()
  {
    return this.J;
  }
  
  public void e(double paramDouble)
  {
    this.J = paramDouble;
  }
  
  public double k()
  {
    return this.F;
  }
  
  public void f(double paramDouble)
  {
    this.F = paramDouble;
  }
  
  public Comparator l()
  {
    if (b()) {
      return O;
    }
    return N;
  }
  
  public Comparator a()
  {
    return l();
  }
  
  static final class a_
    implements Comparator
  {
    private final boolean a;
    private int b = 1;
    
    public int a()
    {
      return this.b;
    }
    
    public void a(int paramInt)
    {
      this.b = paramInt;
    }
    
    a_(boolean paramBoolean)
    {
      this.a = paramBoolean;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = k.n;
      d locald1 = (d)paramObject1;
      d locald2 = (d)paramObject2;
      o localo = (o)locald1.c();
      if (!bool) {
        if (this.a)
        {
          i = l.a(localo.n(locald1.f()), localo.n(locald2.f()));
          if (bool) {
            break label103;
          }
          if (!k.m) {
            break label96;
          }
        }
      }
      int i = l.a(localo.m(locald1.f()), localo.m(locald2.f()));
      label96:
      label103:
      return this.b * i;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.n.j

 * JD-Core Version:    0.7.0.1

 */